MissingPermissionsException.js ➔ ???   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 19

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 19
cc 1
rs 9.4285
1
/**
2
 * An MissingPermissionsException, when the command require special discord permissions
3
 *
4
 * @class MissingPermissionsException
5
 * @extends {Error}
6
 */
7
class MissingPermissionsException extends Error {
8
    /**
9
     * Creates an instance of MissingPermissionsException.
10
     * @param {(Array<string>|string)} missing the missing perms
11
     * @memberof MissingPermissionsException
12
     */
13
  constructor (missing) {
14
    super('Missing discord permissions to execute that command :' + missing)
15
        /**
16
         * The missing permissions
17
         * @type {(Array|string)}
18
         * @name MissingPermissionsException#missingPermissions
19
         * @readonly
20
         */
21
    this.missingPermissions = missing
22
        /**
23
         * The fisherCode
24
         * @type {number}
25
         * @readonly
26
         * @name MissingPermissionsException#code
27
         * @constant
28
         * @default 403
29
         */
30
    this.code = 403
31
  }
32
}
33
module.exports = MissingPermissionsException
34